<?php

namespace App\Models\V1;

use App\Scopes\V1\ValidDataScope;
use Illuminate\Database\Eloquent\Model;

class InfoNotice extends Model
{
    /**
     * 模型启动函数
     */
    protected static function boot()
    {
        parent::boot();
        static::addGlobalScope(new ValidDataScope);
    }

    /**
     * 可被批量赋值字段（白名单）
     *
     * @var array
     */
    protected $fillable = [
        'code', 'title', 'program_code', 'publisher_code', 'type', 'content', 'isShow', 'videoCoverPic'
    ];

    /**
     * 限制数组或JSON输出时，隐藏字段
     *
     * @var array
     */
    protected $hidden = [
        'id', 'deleted_at',
    ];



}
